package cn.fl.audit.service.impl;

import cmm.comm.facade.framework.api.ISysDictionaryApiService;
import cmm.comm.facade.framework.dto.SysDictionaryDTO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cmm.user.facade.system.api.ISysOrgApiService;
import cmm.user.facade.system.api.ISysUsrApiService;
import cmm.user.facade.system.condition.SysUsrQueryCondition;
import cmm.user.facade.system.dto.SysOrgDTO;
import cmm.user.facade.system.dto.SysUsrDTO;
import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.constant.BaseExceptionConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.logger.eum.LogExceptionEnum;
import cn.cmm.base.framework.utils.*;
import cn.fl.audit.condition.AudStandingBookQueryCondition;
import cn.fl.audit.constant.AudStandingBookConstant;
import cn.fl.audit.dto.AudStandingBookDTO;
import cn.fl.audit.service.IAudStandingBookService;
import cn.fl.audit.service.IAuditApiService;
import cn.fl.audit.transform.AudStandingBookVOTransform;
import cn.fl.audit.vo.AudBasicsBookVO;
import cn.fl.audit.vo.AudCreditInfoVO;
import cn.fl.audit.vo.AudRejectOpinionVO;
import cn.fl.audit.vo.AudStandingBookVO;
import cn.fl.capital.condition.CapPayInfoQueryCondition;
import cn.fl.capital.condition.CapPayeeInfoQueryCondition;
import cn.fl.capital.constant.CapPayInfoConstant;
import cn.fl.capital.constant.CapitalConstant;
import cn.fl.capital.dto.CapPayInfoDTO;
import cn.fl.capital.dto.CapPayeeInfoDTO;
import cn.fl.capital.service.ICapPayInfoApiService;
import cn.fl.capital.service.ICapPayeeInfoApiService;
import cn.fl.capital.transform.CapPayInfoVOTransform;
import cn.fl.capital.vo.CapPayInfoVO;
import cn.fl.commons.result.ResponseData;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.framework.constant.DictionaryConstant;
import cn.fl.insurance.vo.InsPlcBscInfoVO;
import cn.fl.preloan.IAuditStandingBookService;
import cn.fl.preloan.condition.AuditStandingBookQueryCondition;
import cn.fl.preloan.dto.audit.*;
import cn.fl.preloan.dto.insurance.InsPlcBscInfoDTO;
import cn.fl.project.condition.PrjBscInfoQueryCondition;
import cn.fl.project.condition.PrjPrdBscInfoQueryCondition;
import cn.fl.project.condition.PrjQuatPrpsFeeQueryCondition;
import cn.fl.project.condition.PrjQuatPrpsQueryCondition;
import cn.fl.project.constant.CarStyleConstant;
import cn.fl.project.constant.PrjQuatPrpsFeeConstant;
import cn.fl.project.dto.PrjBscInfoDTO;
import cn.fl.project.dto.PrjPrdBscInfoDTO;
import cn.fl.project.service.*;
import cn.fl.project.transform.PrjBscInfoVOTransform;
import cn.fl.project.transform.PrjPrdBscInfoVOTransform;
import cn.fl.project.vo.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import fl.riskctrl.facade.riskctrl.acard.api.IRcACardSearchApiService;
import fl.riskctrl.facade.riskctrl.acard.condition.RcCpModExtInfoQC;
import fl.riskctrl.facade.riskctrl.acard.dto.RcCpModExtInfoDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

import static java.util.stream.Collectors.toMap;


/**
 * @Description: 信审台账信息表 客户端服务层接口实现
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
@Service
public class AudStandingBookServiceImpl implements IAudStandingBookService {

	/**
	 * 日志
	 */
	private static final Logger logger = LoggerFactory.getLogger(AudStandingBookServiceImpl.class);
	
	/**
	 * 
	 */
	@Autowired
	private IAuditApiService auditApiService;
	
	/**
	 * 本地数据字典服务
	 */
	@Autowired
	private ISysDictionaryApiService sysDictionaryApiService;

	@Autowired
	private ISysOrgApiService sysOrgApiService;
	
	/**
	 * 项目基础信息服务
	 */
	@Autowired
	private IPrjBscInfoService prjBscInfoService;
	
	/**
	 * 项目信息API
	 */
	@Autowired
	private IProjectApiService projectApiService;
	
	/**
	 * 项目报价方案服务
	 */
	@Autowired
	private IPrjQuatPrpsService prjQuatPrpsService;
	
	/**
	 * 项目报价方案费用信息服务
	 */
	@Autowired
	private IPrjQuatPrpsFeeService IPrjQuatPrpsFeeService;
	
	/**
	 * 用户API服务
	 */
	@Autowired
	private ISysUsrApiService sysUsrApiService;
	
	/**
	 * 项目产品信息服务
	 */
	@Autowired
	private IPrjPrdBscInfoService prjPrdBscInfoService;
	
	/**
	 * 付款信息服务API
	 */
	@Autowired
	private ICapPayInfoApiService capPayInfoApiService;

	@Autowired
	private IRcACardSearchApiService rcACardSearchApiService;

	@Autowired
	private IAuditStandingBookService auditStandingBookService;

	@Autowired
	private ICapPayeeInfoApiService capPayeeInfoApiService;

	@Override
	public AudStandingBookVO selectById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			BaseLogUtils.info(logger, "selectById", "主键参数不能为空!", CurrentThreadContext.getCurrentUserName());
			return null;
		}
		AudStandingBookDTO dto = this.auditApiService.searchAudStandingBookById(id, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
		return AudStandingBookVOTransform.toVO(dto);
	}

	@Override
	public Long add(AudStandingBookVO entity) throws BaseException{
		if(null == entity){
			BaseLogUtils.info(logger, "add", "新增对象不能为空!", CurrentThreadContext.getCurrentUserName());
			return null;
		}
		return this.auditApiService.addAudStandingBook(AudStandingBookVOTransform.toDTO(entity),CurrentThreadContext.getCurrentSysCd(),CurrentThreadContext.getCurrentOrgCd());
	}

	@Override
	public boolean removeById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			BaseLogUtils.info(logger, "removeById", "删除主键参数不能为空!", CurrentThreadContext.getCurrentUserName());
			return false;
		}
		//return this.audStandingBookApiService.removeById(id);
		return false;
	}
	
	/**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException{
    	if(CollectionUtils.isEmpty(ids)){
    		BaseLogUtils.info(logger, "removeByIds", "删除主键参数集合不能为空!", CurrentThreadContext.getCurrentUserName());
			return false;
		};
		return false;
    }

	@Override
	public boolean modify(AudStandingBookVO entity) throws BaseException{
		if(null == entity){
			BaseLogUtils.info(logger, "modify", "修改对象参数不能为空!", CurrentThreadContext.getCurrentUserName());
			return false;
		}
		return this.auditApiService.modifyAudStandingBook(AudStandingBookVOTransform.toDTO(entity));
	}

	@SuppressWarnings("unchecked")
	@Override
	public Pager searchListPage(Pager page) throws BaseException{
		try {
			if(null == page)page = new Pager();
			AuditStandingBookQueryCondition condition = (AuditStandingBookQueryCondition) page.getCondition();
			String bookTypeCd = condition.getBookTypeCd();
			BaseLogUtils.info(logger, "searchListPage", "=================================1===="+new Date());
			//组装查询参数
			AudStandingBookPageRequest pageRequest = new AudStandingBookPageRequest(condition, CurrentThreadContext.getCurrentSysCd()
					, CurrentThreadContext.getCurrentOrgCd(), page.getCurrentPage(), page.getEveryPage());
			ResponseData<AudStandingBookPageResponseDTO> responseData = auditStandingBookService.searchListPage(pageRequest);
			AudStandingBookPageResponseDTO data = new AudStandingBookPageResponseDTO();
			if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
				data = responseData.getData();
			}
			BaseLogUtils.info(logger, "searchListPage", "auditStandingBookService.searchListPage结果："+JSON.toJSONString(responseData));

			List<AuditStandingBookDTO> dtoList = data.getAuditStandingBookDTOS();
			List<AudStandingBookVO> voList = new ArrayList<>();
			if (CollectionUtils.isNotEmpty(dtoList)) {
				for (AuditStandingBookDTO dto : dtoList) {
					AudStandingBookVO vo = new AudStandingBookVO();
					BeanUtils.copyProperties(dto, vo);
					//信审整体资料
					AuditCreditInfoDTO auditCreditInfoDTO = dto.getAuditCreditInfoDTO();
					if (auditCreditInfoDTO != null) {
						AudCreditInfoVO audCreditInfoVO = new AudCreditInfoVO();
						BeanUtils.copyProperties(auditCreditInfoDTO, audCreditInfoVO);
						audCreditInfoVO.setHouseCret(auditCreditInfoDTO.getHouseCert());
						audCreditInfoVO.setFareType(auditCreditInfoDTO.getFareTypeCd());
						audCreditInfoVO.setChargingType(auditCreditInfoDTO.getChargingTypeCd());
						audCreditInfoVO.setHandingMode(auditCreditInfoDTO.getHandlingMode());
						vo.setAudCreditInfoVO(audCreditInfoVO);
					}
					InsPlcBscInfoDTO insPlcBscInfoDTO = dto.getInsPlcBscInfoDTO();
					if (insPlcBscInfoDTO != null) {
						InsPlcBscInfoVO insPlcBscInfoVO = new InsPlcBscInfoVO();
						BeanUtils.copyProperties(insPlcBscInfoDTO, insPlcBscInfoVO);
						vo.setInsPlcBscInfoVO(insPlcBscInfoVO);
					}
					voList.add(vo);
				}
			}
			BaseLogUtils.info(logger, "searchListPage", "=================================2===="+new Date());
			//Map<String, String> SCHR6ListMap = this.sysDictionaryApiService.searchGroupToMap(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(),DictionaryConstant.RC_CP_MOD_EXT_INFO_SCHR6);
//			List<SysDictionaryDTO> SCHR6List = this.sysDictionaryApiService.searchGroup(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), DictionaryConstant.RC_CP_MOD_EXT_INFO_SCHR6);
			if(CollectionUtils.isNotEmpty(voList)){
				List<Long> crtUsrIdList = new ArrayList<Long>();//创建人IDList
				List<Long> projectIdList = new ArrayList<Long>();//项目IDList
				List<Long> prjPrdIdList = new ArrayList<Long>();//项目产品IDList
				List<Long> payIdList = new ArrayList<Long>();//付款IDList
				
				BaseLogUtils.info(logger, "searchListPage", "=================================3===="+new Date());
				for (AudStandingBookVO audStandingBookVO : voList) {
					if(StringUtils.isNotEmpty(audStandingBookVO.getCrtUsrId())){
						if(null!=audStandingBookVO.getCrtUsrId() && !crtUsrIdList.contains(audStandingBookVO.getCrtUsrId())){
							crtUsrIdList.add(audStandingBookVO.getCrtUsrId());
						}
						if(null!=audStandingBookVO.getMdfUsrId() && !crtUsrIdList.contains(audStandingBookVO.getMdfUsrId())){
							crtUsrIdList.add(audStandingBookVO.getMdfUsrId());
						}
					}
					if(StringUtils.isNotEmpty(audStandingBookVO.getProjectId())){
						projectIdList.add(audStandingBookVO.getProjectId());
					}
					if(StringUtils.isNotEmpty(audStandingBookVO.getPrjPrdId())){
						prjPrdIdList.add(audStandingBookVO.getPrjPrdId());
					}
					if(StringUtils.isNotEmpty(audStandingBookVO.getPayId())){
						payIdList.add(audStandingBookVO.getPayId());
					}
				}
				BaseLogUtils.info(logger, "searchListPage", "=================================4===="+new Date());
				//付款IDList-->付款信息-->加入到项目IDList
				
				Map<Long, Long> capPayIdPrjIdMap = new HashMap<Long, Long>();
				if(CollectionUtils.isNotEmpty(payIdList)){
					if(true){
						CapPayInfoQueryCondition capQC = new CapPayInfoQueryCondition();
						capQC.setIdList(payIdList);
						capQC.setIsDel(1);
						List<CapPayInfoDTO> capPayInfoList = this.capPayInfoApiService.searchCapPayInfoList(capQC);
						if(CollectionUtils.isNotEmpty(capPayInfoList)){
							for (CapPayInfoDTO capPayInfoDTO : capPayInfoList) {
								if(null!=capPayInfoDTO){
									capPayIdPrjIdMap.put(capPayInfoDTO.getId(), capPayInfoDTO.getPrjId());
									projectIdList.add(capPayInfoDTO.getPrjId());
								}
								for (AudStandingBookVO audStandingBookVO : voList) {
									if(null!=audStandingBookVO && null!=capPayInfoDTO && null!=audStandingBookVO.getPayId()
											&&audStandingBookVO.getPayId().equals(capPayInfoDTO.getId())){
										audStandingBookVO.setCapPayInfoVO(CapPayInfoVOTransform.toVO(capPayInfoDTO));
										//break;
									}
									
								}
							}
						}
					}
					if(true){
						CapPayInfoQueryCondition capQC = new CapPayInfoQueryCondition();
						capQC.setIdList(payIdList);
						capQC.setIsDel(0);
						List<CapPayInfoDTO> capPayInfoList = this.capPayInfoApiService.searchCapPayInfoList(capQC);
						if(CollectionUtils.isNotEmpty(capPayInfoList)){
							for (CapPayInfoDTO capPayInfoDTO : capPayInfoList) {
								if(null!=capPayInfoDTO){
									capPayIdPrjIdMap.put(capPayInfoDTO.getId(), capPayInfoDTO.getPrjId());
									projectIdList.add(capPayInfoDTO.getPrjId());
								}
								for (AudStandingBookVO audStandingBookVO : voList) {
									if(null!=audStandingBookVO && null!=capPayInfoDTO && null!=audStandingBookVO.getPayId()
											&&audStandingBookVO.getPayId().equals(capPayInfoDTO.getId())){
										audStandingBookVO.setCapPayInfoVO(CapPayInfoVOTransform.toVO(capPayInfoDTO));
										//break;
									}
									
								}
							}
						}
					}
				}
				
				//设置创建人名称
				if(CollectionUtils.isNotEmpty(crtUsrIdList)){
					SysUsrQueryCondition sysUsrQC = new SysUsrQueryCondition();
					sysUsrQC.setUsrIds(crtUsrIdList);
					sysUsrQC.setSysCd(CurrentThreadContext.getCurrentSysCd());
					List<SysUsrDTO> sysUsrDTOList = this.sysUsrApiService.searchSysUsrList(sysUsrQC);
					if(CollectionUtils.isNotEmpty(sysUsrDTOList)){
						for (AudStandingBookVO audStandingBookVO : voList) {
							for (SysUsrDTO sysUsrDTO : sysUsrDTOList) {
								if(null!=sysUsrDTO && null!=audStandingBookVO && null!=sysUsrDTO.getId()
										&& sysUsrDTO.getId().equals(audStandingBookVO.getMdfUsrId())){
									audStandingBookVO.setMdfUsrNm(sysUsrDTO.getRefRlNm());
								}
								if(null!=sysUsrDTO && null!=audStandingBookVO && null!=sysUsrDTO.getId()
										&& sysUsrDTO.getId().equals(audStandingBookVO.getCrtUsrId())){
									audStandingBookVO.setCrtUsrNm(sysUsrDTO.getRefRlNm());
								}
							}
						}
					}
				}
				//项目信息
				if(CollectionUtils.isNotEmpty(projectIdList)){
					//查询审批类型
					/*RcCpModExtInfoQC rcCpModExtInfoQc = new RcCpModExtInfoQC();
					rcCpModExtInfoQc.setDataIdList(projectIdList);//根据项目id
					fl.riskctrl.facade.riskctrl.dto.DataResultDTO rcCpModExtInfoByCstBascInfo = this.rcACardSearchApiService.getRcCpModExtInfoByCstBascInfo(rcCpModExtInfoQc);//调方法
					List<RcCpModExtInfoDTO> RcCpModExtInfoList = (List<RcCpModExtInfoDTO>) rcCpModExtInfoByCstBascInfo.getData();*/
					PrjBscInfoQueryCondition prjQC = new PrjBscInfoQueryCondition();
					prjQC.setIdList(projectIdList);
					List<PrjBscInfoDTO> prjBscInfoList = this.projectApiService.searchList(prjQC, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
					if(CollectionUtils.isNotEmpty(prjBscInfoList)){
						for (AudStandingBookVO audStandingBookVO : voList) {
							for (PrjBscInfoDTO prjBscInfoDTO : prjBscInfoList) {
								if(null!=prjBscInfoDTO && null!=audStandingBookVO && null!=prjBscInfoDTO.getId()
										&& prjBscInfoDTO.getId().equals(audStandingBookVO.getProjectId())){
									audStandingBookVO.setPrjBscInfoVO(PrjBscInfoVOTransform.toVO(prjBscInfoDTO));
									break;
								}
							}

						}
						//获取审批类型
						/*for (AudStandingBookVO audStandingBookVO : voList) {
							if(CollectionUtils.isNotEmpty(RcCpModExtInfoList)){
								for (SysDictionaryDTO SCHR6list : SCHR6List){
									
							   for (RcCpModExtInfoDTO rcCpModExtInfo : RcCpModExtInfoList){
								   if(SCHR6list.getCode().equals(rcCpModExtInfo.getSchr6()) && rcCpModExtInfo.getDataId().equals(audStandingBookVO.getProjectId())){
									   audStandingBookVO.setSchr_6Nm(SCHR6list.getCodeNm());
								   }
								}
							    }
							}
						 }*/
						//放款台账特殊处理
						for (AudStandingBookVO audStandingBookVO : voList) {
							for (PrjBscInfoDTO prjBscInfoDTO : prjBscInfoList) {
								if(null!=capPayIdPrjIdMap.get(audStandingBookVO.getPayId())
										&& capPayIdPrjIdMap.get(audStandingBookVO.getPayId()).equals(prjBscInfoDTO.getId())){
									audStandingBookVO.setPrjBscInfoVO(PrjBscInfoVOTransform.toVO(prjBscInfoDTO));
								}
							}
						}
					}
					
				}
				//产品信息(核价台账)
				if(AudStandingBookConstant.AUD_TYP_CD_PRCE.equals(bookTypeCd)){
					if(CollectionUtils.isNotEmpty(prjPrdIdList)){
						PrjPrdBscInfoQueryCondition prjPrdQC = new PrjPrdBscInfoQueryCondition();
						prjPrdQC.setIdList(prjPrdIdList);
						List<PrjPrdBscInfoDTO> prjPrdList = this.projectApiService.searchPrjPrdList(prjPrdQC,CurrentThreadContext.getCurrentSysCd(),CurrentThreadContext.getCurrentOrgCd());
						if(CollectionUtils.isNotEmpty(prjPrdList)){
							for (AudStandingBookVO audStandingBookVO : voList) {
								for (PrjPrdBscInfoDTO prjPrdBscInfoDTO : prjPrdList) {
									if(null!=prjPrdBscInfoDTO && null!=audStandingBookVO && null!=prjPrdBscInfoDTO.getId()
											&& prjPrdBscInfoDTO.getId().equals(audStandingBookVO.getPrjPrdId())){
										//金额处理
										if(null!=prjPrdBscInfoDTO && null!=prjPrdBscInfoDTO.getGuidePc()){
											prjPrdBscInfoDTO.setGuidePc(DecimalUtils.convertFenToYuan(prjPrdBscInfoDTO.getGuidePc().longValue()));
										}
										audStandingBookVO.setPrjPrdBscInfoVO(PrjPrdBscInfoVOTransform.toVO(prjPrdBscInfoDTO));
										break;
									}
								}
							}
						}
					}
				}
			}
			BaseLogUtils.info(logger, "searchListPage", "=================================5===="+new Date());
			page.setResultList(voList);
			page.setTotalCount(data.getTotalCount());
		} catch (Exception e) {
			BaseLogUtils.info(logger, "searchListPage", "=查询台账列表异常="+e.getMessage());
			e.printStackTrace();
		}
		return page;
	}

	@Override
	public AudStandingBookVO selectAudStandingBookByQc(AuditStandingBookQueryCondition qc) throws BaseException {
		AudStandingBookListRequest listRequest = new AudStandingBookListRequest(qc, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
		ResponseData<List<AuditStandingBookDTO>> responseData = auditStandingBookService.searchList(listRequest);
		BaseLogUtils.info(logger, "selectAudStandingBookByQc", "查询信审台账：" + JSONObject.toJSONString(responseData), CurrentThreadContext.getCurrentUserName());
		if(!ResponseData.SUCCESS_CODE.equals(responseData.getCode())){
			throw new BaseException(BaseExceptionConstant.DATABASE_0201_NAME, "查询失败");
		}
		List<AuditStandingBookDTO> listDTO = responseData.getData();

		AudStandingBookVO audStandingBookVO = new AudStandingBookVO();
		if (CollectionUtils.isNotEmpty(listDTO)) {
			AuditStandingBookDTO dto = listDTO.get(0);
			BeanUtils.copyProperties(dto, audStandingBookVO);
			if (CollectionUtils.isNotEmpty(dto.getAudRejectOpinionDTOList())) {
				List<AudRejectOpinionVO> audRejectOpinionVOS = new ArrayList<>();
				for (AuditRejectOpinionDTO auditRejectOpinionDTO : dto.getAudRejectOpinionDTOList()) {
					AudRejectOpinionVO audRejectOpinionVO = new AudRejectOpinionVO();
					BeanUtils.copyProperties(auditRejectOpinionDTO, audRejectOpinionVO);
					audRejectOpinionVO.setCapPayId(auditRejectOpinionDTO.getPayId());
					audRejectOpinionVOS.add(audRejectOpinionVO);
				}
				audStandingBookVO.setAudRejectOpinionVOList(audRejectOpinionVOS);
			}
		}else{
			/**
			 * 当前节点没有信审基础台账
			 *    查询此流程其他节点信审基础台账 有取值
			 *    无查询项目信息取值设置
			 */
			if(qc!=null && StringUtils.isNotEmpty(qc.getBookTypeCd()) && AudStandingBookConstant.AUD_TYP_CD_BSC.equals(qc.getBookTypeCd())){//信审基础台账
				AudBasicsBookVO audBasicsBookVO = new AudBasicsBookVO();
				/**
				 * 查询此流程信审基础台账
				 */
				qc.setTaskDefKey(null);

				AudStandingBookListRequest bookListRequest = new AudStandingBookListRequest(qc, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
				ResponseData<List<AuditStandingBookDTO>> listResponseData = auditStandingBookService.searchList(bookListRequest);
				BaseLogUtils.info(logger, "selectAudStandingBookByQc", "查询信审台账：" + JSONObject.toJSONString(listResponseData), CurrentThreadContext.getCurrentUserName());
				if (!ResponseData.SUCCESS_CODE.equals(listResponseData.getCode())) {
					throw new BaseException(BaseExceptionConstant.DATABASE_0201_NAME, "查询失败");
				}
				if(CollectionUtils.isEmpty(listResponseData.getData())){
					/**
					 * 根据项目ID查询报价方案信息 设置数据到audStandingBookDTO对象中
					 */
					if(CollectionUtils.isNotEmpty(qc.getProjectIdList())){
						PrjQuatPrpsQueryCondition prjQuatQc = new PrjQuatPrpsQueryCondition();
						prjQuatQc.setPrjId(qc.getProjectIdList().get(0));
						prjQuatQc.setIsFormalPrps(BaseConstant.IS_YESNO_YES);
						List<PrjQuatPrpsVO> prjQuatList = this.prjQuatPrpsService.searchList(prjQuatQc);
						if(CollectionUtils.isNotEmpty(prjQuatList)){
							PrjQuatPrpsVO prjQuatPrpsVO = prjQuatList.get(0);//项目报价方案
							if(null!=prjQuatPrpsVO.getAnnIntRatePct()){
								audBasicsBookVO.setAnnualRatePct(DecimalUtils.round(prjQuatPrpsVO.getAnnIntRatePct(), 2));//四舍五入年利率
							}
							if(null!=prjQuatPrpsVO.getIrrPct()){
								audBasicsBookVO.setReturnPct(DecimalUtils.round(prjQuatPrpsVO.getIrrPct(), 2));//四舍五入收益率
							}
							audBasicsBookVO.setFinancingAmt(prjQuatPrpsVO.getActLsAmt());//融资总金额
							//根据项目报价方案ID查询报价方案基础费用信息
							PrjQuatPrpsFeeQueryCondition feeQc = new PrjQuatPrpsFeeQueryCondition();
							feeQc.setPrpsId(prjQuatPrpsVO.getId());
							List<PrjQuatPrpsFeeVO> feeList = this.IPrjQuatPrpsFeeService.searchList(feeQc);//方案费用信息集合
							if(CollectionUtils.isNotEmpty(feeList)){
								for (PrjQuatPrpsFeeVO prjQuatPrpsFeeVO : feeList) {
									if(prjQuatPrpsFeeVO.getFeeTypCd().equals(PrjQuatPrpsFeeConstant.PRJ_FEE_TYP_FIRST_PRC)){
										//比例数据四舍五入
										if(null!=prjQuatPrpsFeeVO.getFeePct()){
											audBasicsBookVO.setFirstPaymentPct(DecimalUtils.round(prjQuatPrpsFeeVO.getFeePct(), 2));//首付比例
										}
									}else if (prjQuatPrpsFeeVO.getFeeTypCd().equals(PrjQuatPrpsFeeConstant.PRJ_FEE_TYP_COLLATERAL)){
										//比例数据四舍五入
										if(null!=prjQuatPrpsFeeVO.getFeePct()){
											audBasicsBookVO.setDepositPct(DecimalUtils.round(prjQuatPrpsFeeVO.getFeePct(), 2));//保证金比例
										}
									}else if(prjQuatPrpsFeeVO.getFeeTypCd().equals(PrjQuatPrpsFeeConstant.PRJ_FEE_TYP_CONSULT_1)){
										audBasicsBookVO.setConsultingOneAmt(prjQuatPrpsFeeVO.getFeeAmt());//咨询费1
									}else if(prjQuatPrpsFeeVO.getFeeTypCd().equals(PrjQuatPrpsFeeConstant.PRJ_FEE_TYP_CONSULT_2)){
										audBasicsBookVO.setConsultingTwoAmt(prjQuatPrpsFeeVO.getFeeAmt());//咨询费2
									}
								}
							}
						}
					}
				}
				audStandingBookVO.setAudBasicsBookVO(audBasicsBookVO);
			}
		}
		AudBasicsBookVO audBasicsBookVO = audStandingBookVO.getAudBasicsBookVO();
		if(null!=audBasicsBookVO){
			//处理金额显示
			if(null!=audBasicsBookVO.getConsultingOneAmt()){
				audBasicsBookVO.setConsultingOneAmt(DecimalUtils.div(audBasicsBookVO.getConsultingOneAmt(), 100));
			}
			if(null!=audBasicsBookVO.getConsultingTwoAmt()){
				audBasicsBookVO.setConsultingTwoAmt(DecimalUtils.div(audBasicsBookVO.getConsultingTwoAmt(), 100));
			}
			if(null!=audBasicsBookVO.getFinancingAmt()){
				audBasicsBookVO.setFinancingAmt(DecimalUtils.div(audBasicsBookVO.getFinancingAmt(), 100));
			}
		}
		audStandingBookVO.setAudBasicsBookVO(audBasicsBookVO);
		return audStandingBookVO;
	}

	@Override
	public List<KeyValueVO> searchReasonTypeCdList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_AUD_REASON_TYP_CD);
	}

	@Override
	public List<KeyValueVO> searchBrandLevelCdList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_AUD_BR_LVL_CD);
	}

	@Override
	public List<KeyValueVO> searchProcessOpinionCdList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_AUD_PROCESS_OPINION_CD);
	}

	@Override
	public List<KeyValueVO> searchYesOrNoCdList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_SYS_YES_NO_CD);
	}
	
	@Override
	public List<KeyValueVO> searchIndustryTypeCdList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_GRP_IND_CD);
	}

	@Override
	public List<KeyValueVO> searchLocalOrNoList() throws BaseException {
		return this.getKvList(DictionaryConstant.CODE_AUD_LOCAL_OR_NO);
	}
	
	@Override
	public List<KeyValueVO> searchRepayTypCdList() throws BaseException {
		return this.getKvList(fl.customer.facade.framework.constant.DictionaryConstant.CODE_GRP_BACK_PAY_TYP_CD);
	}

	//******************************************私有方法*********************************/
	/**
	 * 根据字典中代码组值获取组员集合
	 * @param grpCd 代码组值
	 * @return 集合
	 */
	private List<KeyValueVO> getKvList(String grpCd){
		List<KeyValueVO> kvList = new ArrayList<>();
		try {
			List<SysDictionaryDTO> sysDictionaryDTOList = this.sysDictionaryApiService.searchGroup(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), grpCd);
			if(CollectionUtils.isNotEmpty(sysDictionaryDTOList)){
				for (SysDictionaryDTO sysDictionaryDTO : sysDictionaryDTOList) {
					KeyValueVO keyValueVO = new KeyValueVO();
					keyValueVO.setKey(sysDictionaryDTO.getCode());
					keyValueVO.setValue(sysDictionaryDTO.getCodeNm());
					kvList.add(keyValueVO);
				}
			}
		} catch (BaseException e) {
			BaseLogUtils.info(logger, "getKvList", "获取字典项组"+grpCd+"失败.ERROR:"+e.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception e) {
			BaseLogUtils.error(logger, "getKvList", "获取字典项组"+grpCd+"失败,系统错误.ERROR:"+e.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return kvList;
	}

	@Override
	public String exportBscBook(AudStandingBookQueryCondition condition, String orgCd) throws BaseException {
		if(null==condition) condition = new AudStandingBookQueryCondition();
		if(StringUtils.isEmpty(orgCd))orgCd = CurrentThreadContext.getCurrentOrgCd();
		return this.auditApiService.exportBscBook(condition, orgCd);
	}

	/**
	 * 预览核价信息
	 */
	/*@Override
	public String getPreviewCorePrcInfo(Long prjPrdId) throws BaseException {
		if(StringUtils.isEmpty(prjPrdId))return "";
		PrjPrdBscInfoVO prjPrdBscInfoVO = this.prjPrdBscInfoService.selectPrjPrdBscAndDetailInfoById(prjPrdId.toString());
		PrjPrdTkInfoVO prjPrdTkInfoVO = prjPrdBscInfoVO.getPrjPrdTkInfoVO();
		if(null!=prjPrdTkInfoVO){
			List<PrjPrdTkInfoVO> prjPrdTkInfoVOList = new ArrayList<PrjPrdTkInfoVO>();
			prjPrdTkInfoVOList.add(prjPrdTkInfoVO);
			this.setDictData(prjPrdTkInfoVOList);//设置字典项信息
			prjPrdTkInfoVO = prjPrdTkInfoVOList.get(0);
		}
		StringBuffer previewCorePrcInfo = new StringBuffer();
		if(null!=prjPrdBscInfoVO){
			if(StringUtils.isNotEmpty(prjPrdBscInfoVO.getBrCdNm())){
				previewCorePrcInfo.append(prjPrdBscInfoVO.getBrCdNm());//品牌
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getDrvTypNm())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getDrvTypNm());//驱动
			}
			if(StringUtils.isNotEmpty(prjPrdBscInfoVO.getPrdTypCdNm())){
				previewCorePrcInfo.append(prjPrdBscInfoVO.getPrdTypCdNm());//产品类型
			}
			previewCorePrcInfo.append("，");
			if(StringUtils.isNotEmpty(prjPrdBscInfoVO.getPrdMdl())){
				previewCorePrcInfo.append(prjPrdBscInfoVO.getPrdMdl());//型号
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getEngMdl())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getEngMdl());//发动机型号
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getHpNm())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getHpNm()+"马力，");//马力
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getCabSpec())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getCabSpec()+"，");//驾驶室规格
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getGrboxMdl())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getGrboxMdl()+"，");//变速箱型号
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getRearAxleSpec())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getRearAxleSpec()+"，");//后桥规格
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getmWhlSpecNm())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getmWhlSpecNm()+"轮胎，");//轮胎规格
			}
			if(StringUtils.isNotEmpty(prjPrdBscInfoVO.getPrdRem())){
				previewCorePrcInfo.append(prjPrdBscInfoVO.getPrdRem()+"，");//备注
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getActCntrSz())){
				previewCorePrcInfo.append("有货箱"+prjPrdTkInfoVO.getActCntrSz()+"，");
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getThickness())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getThickness()+"，");
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getMatQalCdNm())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getMatQalCdNm()+"，");
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getLiftWayCdNm())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getLiftWayCdNm()+"，");
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getDoorInfo())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getDoorInfo()+"，");
			}
			if(null!=prjPrdTkInfoVO && StringUtils.isNotEmpty(prjPrdTkInfoVO.getCylSepc())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getCylSepc()+"，");
			}
			if(null!=prjPrdTkInfoVO && null!=prjPrdTkInfoVO.getTankVol() && StringUtils.isNotEmpty(prjPrdTkInfoVO.getTankVol().toString())){
				previewCorePrcInfo.append(prjPrdTkInfoVO.getTankVol().toString()+"，");
			}
			previewCorePrcInfo.append("经核实底盘出厂价为   元，货箱为   元，该方案报价"+prjPrdBscInfoVO.getGuidePc()+"元符合市场价格。");
		}
		
		return previewCorePrcInfo.toString();
	}*/
	
	@SuppressWarnings("unused")
	//2017-4-20 YAOXIURONG
	@Override
	public String getPreviewCorePrcInfo(Long prjPrdId) throws BaseException {
		if(StringUtils.isEmpty(prjPrdId))return "";
		BaseLogUtils.info(logger, "getPreviewCorePrcInfo", "===查询产品及明细信息Start===prjPrdId:"+prjPrdId);
		PrjPrdBscInfoVO prjPrdBscInfoVO = this.prjPrdBscInfoService.selectPrjPrdBscAndDetailInfoById(prjPrdId.toString());
		BaseLogUtils.info(logger, "getPreviewCorePrcInfo", "===查询产品及明细信息End===prjPrdBscInfoVO:"+JSON.toJSONString(prjPrdBscInfoVO));
		if(null==prjPrdBscInfoVO) prjPrdBscInfoVO = new PrjPrdBscInfoVO();
		PrjPrdExtVO prjprdExtVo = prjPrdBscInfoVO.getPrjPrdExtVO();
		if(null!=prjprdExtVo){
			List<PrjPrdExtVO> prjPrdTkInfoVOList = new ArrayList<PrjPrdExtVO>();
			prjPrdTkInfoVOList.add(prjprdExtVo);
			this.setDictData(prjPrdTkInfoVOList);//设置字典项信息
			prjprdExtVo = prjPrdTkInfoVOList.get(0);
		}else{
			prjprdExtVo = new PrjPrdExtVO();
		}
		String prdTypCdNm = prjPrdBscInfoVO.getPrdTypCdNm();//1:产品类型
		String prdNm = prjPrdBscInfoVO.getPrdNm();//2:产品名称
		String prdMdl = prjPrdBscInfoVO.getPrdMdl();//3:车辆型号
		String brCdNm = prjPrdBscInfoVO.getBrCdNm();//4:品牌
		String drvTypNm = prjprdExtVo.getDrvTypNm();//5:驱动
		String engMdl = prjprdExtVo.getEngMdl();//6:发动机型号
		//TODO 7:发动机品牌
		String hpNm = prjprdExtVo.getHpNm();//8:马力
		String emiStd = prjprdExtVo.getEmiStd();//9:排放标准
		String cabSpec = prjprdExtVo.getCabSpec();//10:驾驶室规格
		String grboxMdl = prjprdExtVo.getGrboxMdl();//11:变速箱型号
		String rearAxleSpec = prjprdExtVo.getRearAxleSpec();//12:后桥规格
		String getmWhlSpecNm = prjprdExtVo.getmWhlSpecNm();//13:轮胎规格
		String cntrSz = prjprdExtVo.getCntrSz();//14:合格证货箱内部尺寸(毫米)
		Integer isHvSub = prjprdExtVo.getIsHvSub();//15:是否含上装
		String mOthInfo = prjprdExtVo.getmOthInfo();//16:主车其他配置
		Double guidePc = prjPrdBscInfoVO.getGuidePc();//17:建议价格
		//18:产品类型
		//19:产品名称
		//20:车辆型号
		String actCntrSz = prjprdExtVo.getActCntrSz();//21:货箱（长*宽*高）单位毫米
		String thickness = prjprdExtVo.getThickness();//22:板材厚度（底*边）单位毫米
		String matQalCdNm = prjprdExtVo.getMatQalCdNm();//23:板材材质
		String liftWayCdNm = prjprdExtVo.getLiftWayCdNm();//24:举升方式
		String doorInfo = prjprdExtVo.getDoorInfo();//25:开门数及方式
		String cylSepc = prjprdExtVo.getCylSepc();//26:油缸规格
		String tankVol = prjprdExtVo.getTankVol();//27:罐体容积
		Integer isHvWhl = prjprdExtVo.getIsHvWhl();//28:是否有轮胎
		String trlWhlSpec = prjprdExtVo.getTrlWhlSpec();//29:轮胎规格
		String axleInfo = prjprdExtVo.getAxleInfo();//30:车轴品牌及数量
		String othInfo = prjprdExtVo.getOthInfo();//31:挂车其他配置
		
		Double prdAmt = prjPrdBscInfoVO.getGuidePc();//报价金额(项目产品价格)
		
		StringBuffer previewCorePrcInfo = new StringBuffer();
		String prdTypCd = prjPrdBscInfoVO.getPrdTypCd();
		Long hp = prjprdExtVo.getHp();
		
		if(CarStyleConstant.PRD_TYPE_1.equals(prdTypCd)){ /**牵引车*/
			if(StringUtils.isNotEmpty(brCdNm)) previewCorePrcInfo.append(brCdNm);//品牌
			if(StringUtils.isNotEmpty(drvTypNm)) previewCorePrcInfo.append(drvTypNm);//驱动
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm);//产品名称
			previewCorePrcInfo.append("，");
			//TODO 发动机品牌
			if(StringUtils.isNotEmpty(hpNm)) previewCorePrcInfo.append(hpNm + "马力");//马力
			if(StringUtils.isNotEmpty(emiStd)) previewCorePrcInfo.append(emiStd+"，");//排放标准
			if(StringUtils.isNotEmpty(cabSpec)) previewCorePrcInfo.append(cabSpec+"，");//驾驶室规格
			if(StringUtils.isNotEmpty(grboxMdl)) previewCorePrcInfo.append(grboxMdl+"，");//变速箱型号
			if(StringUtils.isNotEmpty(hpNm) && StringUtils.isEmpty(emiStd)&&StringUtils.isEmpty(cabSpec)&&StringUtils.isEmpty(grboxMdl)){
				previewCorePrcInfo.append("，");
			}
			if(StringUtils.isNotEmpty(rearAxleSpec)) previewCorePrcInfo.append(rearAxleSpec+"，");//后桥规格
			if(StringUtils.isNotEmpty(getmWhlSpecNm)) previewCorePrcInfo.append(getmWhlSpecNm+"轮胎，");//轮胎规格
			previewCorePrcInfo.append("经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}else if(CarStyleConstant.PRD_TYPE_3.equals(prdTypCd)){ /**载货车*/
			if(StringUtils.isNotEmpty(brCdNm)) previewCorePrcInfo.append(brCdNm);//品牌
			if(StringUtils.isNotEmpty(drvTypNm)) previewCorePrcInfo.append(drvTypNm);//驱动
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm);//产品名称
			previewCorePrcInfo.append("，");
			if(null!=hp && Long.valueOf(180l).compareTo(hp)<=0){
				//TODO 发动机品牌
				if(StringUtils.isNotEmpty(hpNm)) previewCorePrcInfo.append(hpNm + "马力");//马力
				if(StringUtils.isNotEmpty(emiStd)) previewCorePrcInfo.append(emiStd+"，");//排放标准
				if(StringUtils.isNotEmpty(cabSpec)) previewCorePrcInfo.append(cabSpec+"，");//驾驶室规格
				if(StringUtils.isNotEmpty(grboxMdl)) previewCorePrcInfo.append(grboxMdl+"，");//变速箱型号
				if(StringUtils.isNotEmpty(hpNm) && StringUtils.isEmpty(emiStd)&&StringUtils.isEmpty(cabSpec)&&StringUtils.isEmpty(grboxMdl)){
					previewCorePrcInfo.append("，");
				}
				if(StringUtils.isNotEmpty(rearAxleSpec)) previewCorePrcInfo.append(rearAxleSpec+"，");//后桥规格
				if(StringUtils.isNotEmpty(getmWhlSpecNm)) previewCorePrcInfo.append(getmWhlSpecNm+"轮胎，");//轮胎规格
			}
			if(null!=isHvSub && BaseConstant.IS_YESNO_YES==isHvSub){
				previewCorePrcInfo.append("含货箱");
				if(StringUtils.isNotEmpty(actCntrSz)) previewCorePrcInfo.append(actCntrSz);//货箱规格
			}else{
				previewCorePrcInfo.append("不含货箱");
				if(StringUtils.isNotEmpty(cntrSz)) previewCorePrcInfo.append(cntrSz);//合格证货箱尺寸
			}
			previewCorePrcInfo.append("，经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}else if(CarStyleConstant.PRD_TYPE_2.equals(prdTypCd)){	/**自卸车*/
			if(StringUtils.isNotEmpty(brCdNm)) previewCorePrcInfo.append(brCdNm);//品牌
			if(StringUtils.isNotEmpty(drvTypNm)) previewCorePrcInfo.append(drvTypNm);//驱动
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm);//产品名称
			previewCorePrcInfo.append("，");
			//TODO 发动机品牌
			if(StringUtils.isNotEmpty(hpNm)) previewCorePrcInfo.append(hpNm + "马力");//马力
			if(StringUtils.isNotEmpty(emiStd)) previewCorePrcInfo.append(emiStd+"，");//排放标准
			if(StringUtils.isNotEmpty(cabSpec)) previewCorePrcInfo.append(cabSpec+"，");//驾驶室规格
			if(StringUtils.isNotEmpty(grboxMdl)) previewCorePrcInfo.append(grboxMdl+"，");//变速箱型号
			if(StringUtils.isNotEmpty(hpNm) && StringUtils.isEmpty(emiStd)&&StringUtils.isEmpty(cabSpec)&&StringUtils.isEmpty(grboxMdl)){
				previewCorePrcInfo.append("，");
			}
			if(StringUtils.isNotEmpty(rearAxleSpec)) previewCorePrcInfo.append(rearAxleSpec+"，");//后桥规格
			if(StringUtils.isNotEmpty(getmWhlSpecNm)) previewCorePrcInfo.append(getmWhlSpecNm+"轮胎，");//轮胎规格
			if(null!=isHvSub && BaseConstant.IS_YESNO_YES==isHvSub){
				previewCorePrcInfo.append("含货箱");
				if(StringUtils.isNotEmpty(actCntrSz)) previewCorePrcInfo.append(actCntrSz+"、");//货箱规格
				if(StringUtils.isNotEmpty(thickness)) previewCorePrcInfo.append(thickness+"、");//板材厚度（底*边）单位毫米
				if(StringUtils.isNotEmpty(matQalCdNm)) previewCorePrcInfo.append(matQalCdNm+"、");//板材材质
				if(StringUtils.isNotEmpty(cylSepc)) previewCorePrcInfo.append(cylSepc);//油缸规格
				
			}else{
				previewCorePrcInfo.append("不含货箱");
				if(StringUtils.isNotEmpty(cntrSz)) previewCorePrcInfo.append(cntrSz);//合格证货箱尺寸
			}
			previewCorePrcInfo.append("，经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}else if(CarStyleConstant.PRD_TYPE_10.equals(prdTypCd)){	/**搅拌车*/
			if(StringUtils.isNotEmpty(brCdNm)) previewCorePrcInfo.append(brCdNm);//品牌
			if(StringUtils.isNotEmpty(drvTypNm)) previewCorePrcInfo.append(drvTypNm);//驱动
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm);//产品名称
			previewCorePrcInfo.append("，");
			//TODO 发动机品牌
			if(StringUtils.isNotEmpty(hpNm)) previewCorePrcInfo.append(hpNm + "马力");//马力
			if(StringUtils.isNotEmpty(emiStd)) previewCorePrcInfo.append(emiStd+"，");//排放标准
			if(StringUtils.isNotEmpty(cabSpec)) previewCorePrcInfo.append(cabSpec+"，");//驾驶室规格
			if(StringUtils.isNotEmpty(grboxMdl)) previewCorePrcInfo.append(grboxMdl+"，");//变速箱型号
			if(StringUtils.isNotEmpty(hpNm) && StringUtils.isEmpty(emiStd)&&StringUtils.isEmpty(cabSpec)&&StringUtils.isEmpty(grboxMdl)){
				previewCorePrcInfo.append("，");
			}
			if(StringUtils.isNotEmpty(rearAxleSpec)) previewCorePrcInfo.append(rearAxleSpec+"，");//后桥规格
			if(StringUtils.isNotEmpty(getmWhlSpecNm)) previewCorePrcInfo.append(getmWhlSpecNm+"轮胎，");//轮胎规格
			if(null!=isHvSub && BaseConstant.IS_YESNO_YES==isHvSub){
				previewCorePrcInfo.append("含搅拌罐，罐体容积");
				if(StringUtils.isNotEmpty(tankVol)) previewCorePrcInfo.append(tankVol);//罐体容积
				previewCorePrcInfo.append("立方");
				
			}else{
				previewCorePrcInfo.append("不含搅拌罐");
			}
			previewCorePrcInfo.append("，经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}else if(CarStyleConstant.PRD_TYPE_11.equals(prdTypCd)){ /**公路专用车/特种专用车/工程专用车*/
			if(StringUtils.isNotEmpty(brCdNm)) previewCorePrcInfo.append(brCdNm);//品牌
			if(StringUtils.isNotEmpty(drvTypNm)) previewCorePrcInfo.append(drvTypNm);//驱动
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm);//产品名称
			previewCorePrcInfo.append("，");
			//TODO 发动机品牌
			if(StringUtils.isNotEmpty(hpNm)) previewCorePrcInfo.append(hpNm + "马力");//马力
			if(StringUtils.isNotEmpty(emiStd)) previewCorePrcInfo.append(emiStd+"，");//排放标准
			if(StringUtils.isNotEmpty(cabSpec)) previewCorePrcInfo.append(cabSpec+"，");//驾驶室规格
			if(StringUtils.isNotEmpty(grboxMdl)) previewCorePrcInfo.append(grboxMdl+"，");//变速箱型号
			if(StringUtils.isNotEmpty(hpNm) && StringUtils.isEmpty(emiStd)&&StringUtils.isEmpty(cabSpec)&&StringUtils.isEmpty(grboxMdl)){
				previewCorePrcInfo.append("，");
			}
			if(StringUtils.isNotEmpty(rearAxleSpec)) previewCorePrcInfo.append(rearAxleSpec+"，");//后桥规格
			if(StringUtils.isNotEmpty(getmWhlSpecNm)) previewCorePrcInfo.append(getmWhlSpecNm+"轮胎，");//轮胎规格
			if(null!=isHvSub && BaseConstant.IS_YESNO_YES==isHvSub){
				previewCorePrcInfo.append("含上装：");
				if(StringUtils.isNotEmpty(actCntrSz)) previewCorePrcInfo.append("货箱"+actCntrSz+"、");//货箱（长*宽*高）单位毫米
				if(StringUtils.isNotEmpty(tankVol)) previewCorePrcInfo.append("罐体容积"+tankVol+"立方、");//罐体容积
				if(StringUtils.isNotEmpty(othInfo)) previewCorePrcInfo.append(othInfo);//挂车其他配置
			}else{
				previewCorePrcInfo.append("不含上装");
			}
			previewCorePrcInfo.append("，经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}else if(CarStyleConstant.PRD_TYPE_9.equals(prdTypCd)){ /**载货类半挂|工程类半挂|专用类半挂*/
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm+"，");//产品名称
			if(StringUtils.isNotEmpty(actCntrSz)) previewCorePrcInfo.append("货箱"+actCntrSz+"；");//货箱（长*宽*高）单位毫米
			if(StringUtils.isNotEmpty(tankVol)) previewCorePrcInfo.append("罐体容积"+tankVol+"立方，");//罐体容积
			if(StringUtils.isNotEmpty(thickness)) previewCorePrcInfo.append(thickness+"，");//板材厚度（底*边）单位毫米
			if(StringUtils.isNotEmpty(matQalCdNm)) previewCorePrcInfo.append(matQalCdNm+"，");//板材材质
			if(StringUtils.isNotEmpty(axleInfo)) previewCorePrcInfo.append(axleInfo+"，");//车轴品牌及数量
			if(null!=isHvWhl && BaseConstant.IS_YESNO_YES==isHvWhl){
				previewCorePrcInfo.append("含轮胎；");
			}else{
				previewCorePrcInfo.append("不含轮胎；");
			}
			if(StringUtils.isNotEmpty(othInfo)) previewCorePrcInfo.append(othInfo+"，");//挂车其他配置
			previewCorePrcInfo.append("经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}else if(CarStyleConstant.PRD_TYPE_52.equals(prdTypCd)){ /**卡车类客车*/
			if(StringUtils.isNotEmpty(brCdNm)) previewCorePrcInfo.append(brCdNm);//品牌
			if(StringUtils.isNotEmpty(drvTypNm)) previewCorePrcInfo.append(drvTypNm);//驱动
			if(StringUtils.isNotEmpty(prdNm)) previewCorePrcInfo.append(prdNm);//产品名称
			previewCorePrcInfo.append("，");
			
			previewCorePrcInfo.append("经核实该方案报价");
			if(null!=prdAmt) previewCorePrcInfo.append(prdAmt);//报价金额
			previewCorePrcInfo.append("元符合市场价格。");
		}
		
		return previewCorePrcInfo.toString();
	}
	
	@Override
	public String getPreviewCorePrcInfoForBusKC(Long prjPrdId) throws BaseException {
		if(StringUtils.isEmpty(prjPrdId))return "";
		BaseLogUtils.info(logger, "getPreviewCorePrcInfoForBusKC", "===查询产品及明细信息Start===prjPrdId:"+prjPrdId);
		PrjPrdBscInfoVO prjPrdBscInfoVO = this.prjPrdBscInfoService.selectPrjPrdBscAndDetailInfoById(prjPrdId.toString());
		BaseLogUtils.info(logger, "getPreviewCorePrcInfoForBusKC", "===查询产品及明细信息End===prjPrdBscInfoVO:"+JSON.toJSONString(prjPrdBscInfoVO));
		if(null==prjPrdBscInfoVO) prjPrdBscInfoVO = new PrjPrdBscInfoVO();
		PrjPrdExtVO prjPrdCarInfoVO = prjPrdBscInfoVO.getPrjPrdExtVO();
		if(null==prjPrdCarInfoVO){
			prjPrdCarInfoVO = new PrjPrdExtVO();
		}
		String prdNm = prjPrdBscInfoVO.getPrdNm();//产品名称
		String emiStdCd = prjPrdCarInfoVO.getEmiStdCd();//排放标准
		String carStrcCfg = prjPrdCarInfoVO.getCarStrcCfg();//车身结构
		String powerTypCd = prjPrdCarInfoVO.getPowerTypCd();//动力方式
		String carLen = prjPrdCarInfoVO.getCarLen();//车身长度
		String seatQtyCd = prjPrdCarInfoVO.getSeatQtyCd();//座位数
		Double guidePc = prjPrdBscInfoVO.getGuidePc();//报价
		//生成核价信息
		StringBuffer previewCorePrcInfo = new StringBuffer();
		if(StringUtils.isNotEmpty(prdNm))previewCorePrcInfo.append(prdNm+"，");
		if(StringUtils.isNotEmpty(emiStdCd))previewCorePrcInfo.append(emiStdCd+"，");
		if(StringUtils.isNotEmpty(carStrcCfg))previewCorePrcInfo.append(carStrcCfg+"，");
		if(StringUtils.isNotEmpty(powerTypCd))previewCorePrcInfo.append(powerTypCd+"，");
		if(null!=carLen)previewCorePrcInfo.append(carLen+"，");
		if(StringUtils.isNotEmpty(seatQtyCd))previewCorePrcInfo.append(seatQtyCd+"座，");
		if(null!=guidePc)previewCorePrcInfo.append("系统报价"+guidePc+"。");
		return previewCorePrcInfo.toString();
	}
	
	/**
	 * 设置字典项信息
	 */
	private void setDictData(List<PrjPrdExtVO> prjPrdTkInfoVOList){
		if(CollectionUtils.isEmpty(prjPrdTkInfoVOList)) return;
		String sysCd = CurrentThreadContext.getCurrentSysCd();
		String orgCd = CurrentThreadContext.getCurrentOrgCd();
		//驱动
		Map<String, String> drvTypCdMap = this.sysDictionaryApiService.searchGroupToMap(sysCd, orgCd, DictionaryConstant.CODE_PRD_DRV_TYP_CD);
		//马力
		Map<String, String> hpMap = this.sysDictionaryApiService.searchGroupToMap(sysCd, orgCd, DictionaryConstant.CODE_PRD_HP);
		//轮胎规格
		Map<String, String> mWhlSpecMap = this.sysDictionaryApiService.searchGroupToMap(sysCd, orgCd, DictionaryConstant.CODE_PRD_M_WHL_SPEC);

		for(PrjPrdExtVO vo:prjPrdTkInfoVOList){
			if(null!=vo){
				if(drvTypCdMap.containsKey(vo.getDrvTyp())){
					vo.setDrvTypNm(drvTypCdMap.get(vo.getDrvTyp()));
				}
				/*if(null!=vo.getHp() && hpMap.containsKey(vo.getHp().toString())){
					vo.setHpNm(hpMap.get(vo.getHp().toString()));
				}*/
				if(null!=vo.getHp()){
					Long hp = vo.getHp();
					long longValue = hp.longValue();
					if(hpMap.containsKey(String.valueOf(longValue))){
						vo.setHpNm(hpMap.get(String.valueOf(longValue)));
					}
				}
				if(mWhlSpecMap.containsKey(vo.getmWhlSpec())){
					vo.setmWhlSpecNm(mWhlSpecMap.get(vo.getmWhlSpec()));
				}
			}
		}
	}

	@Override
	public Pager searchRecordBookListPage(Pager page) throws BaseException {
		try {
			Long startTm = System.currentTimeMillis();
			if (null == page) {
				page = new Pager();
			}
			AuditStandingBookQueryCondition condition = (AuditStandingBookQueryCondition) page.getCondition();
			String bookTypeCd = condition.getBookTypeCd();
			BaseLogUtils.newServiceLogger("searchRecordBookListPage START page:" + JSON.toJSONString(page)).info();
			//组装查询参数
			AudStandingBookPageRequest pageRequest = new AudStandingBookPageRequest();
			pageRequest.setCondition(condition);
			pageRequest.setSysCd(CurrentThreadContext.getCurrentSysCd());
			pageRequest.setOrgCd(CurrentThreadContext.getCurrentOrgCd());
			pageRequest.setPageNum(page.getCurrentPage());
			pageRequest.setPageSize(page.getEveryPage());
			ResponseData<AudStandingBookPageResponseDTO> responseData = auditStandingBookService.searchRecordBookListPage(pageRequest);
			Long endTm = System.currentTimeMillis();
			BaseLogUtils.newServiceLogger("searchRecordBookListPage responseData:" + JSON.toJSONString(responseData) + ",耗时:" + (endTm - startTm)).info();
			AudStandingBookPageResponseDTO data = new AudStandingBookPageResponseDTO();
			if (responseData != null && ResponseData.SUCCESS_CODE.equals(responseData.getCode()) && responseData.getData() != null) {
				data = responseData.getData();
			}
			List<AuditStandingBookDTO> dtoList = data.getAuditStandingBookDTOS();
			List<AudStandingBookVO> voList = new ArrayList<>();
			if (CollectionUtils.isNotEmpty(dtoList)) {
				for (AuditStandingBookDTO dto : dtoList) {
					AudStandingBookVO vo = new AudStandingBookVO();
					BeanUtils.copyProperties(dto, vo);
					voList.add(vo);
				}
			}
			if(CollectionUtils.isNotEmpty(voList)){
				//项目IDList
				List<Long> projectIdList = new ArrayList<>();
				//付款IDList
				List<Long> payIdList = new ArrayList<>();
				BaseLogUtils.newServiceLogger("searchRecordBookListPage 组装结果 START").info();
				for (AudStandingBookVO audStandingBookVO : voList) {
					if(StringUtils.isNotEmpty(audStandingBookVO.getProjectId())){
						projectIdList.add(audStandingBookVO.getProjectId());
					}
					if (StringUtils.isNotEmpty(audStandingBookVO.getPayId()) && !payIdList.contains(audStandingBookVO.getPayId())) {
						payIdList.add(audStandingBookVO.getPayId());
					}
				}
				Map<Long, Long> capPayIdPrjIdMap = new HashMap<>();
				Map<Long, CapPayInfoVO> payIdAndInfoMap = new HashMap<>();
				//组装放款信息
				if (AudStandingBookConstant.AUD_TYP_CD_FL.equals(bookTypeCd) && CollectionUtils.isNotEmpty(payIdList)) {
					//放款状态
					Map<String, String> payStsCdMap = this.sysDictionaryApiService.searchGroupToMap(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), CapPayInfoConstant.CODE_PAY_STS_CD);
					//查询实际付款时间
					CapPayeeInfoQueryCondition payeeQc = new CapPayeeInfoQueryCondition();
					payeeQc.setPayIds(payIdList);
					//收款账号
					payeeQc.setPurpCd(CapitalConstant.CODE_SPL_BK_PURP_CD_1);
					List<CapPayeeInfoDTO> capPayeeInfoVOList = this.capPayeeInfoApiService.searchCapPayeeInfoList(payeeQc);
					Map<Long, CapPayeeInfoDTO> payeeMap = null;
					if (CollectionUtils.isNotEmpty(capPayeeInfoVOList)) {
						payeeMap = capPayeeInfoVOList.stream().filter(it -> it.getActPayTm() != null).
								collect(toMap(CapPayeeInfoDTO::getPayId, e -> e, (v1, v2) -> v2));
					}
					//查询is_del=0的放款信息
					CapPayInfoQueryCondition capQC = new CapPayInfoQueryCondition();
					capQC.setIdList(payIdList);
					List<CapPayInfoDTO> capPayInfoList = this.capPayInfoApiService.searchCapPayInfoList(capQC);
					//判断是否需要查询is_del=1的数据
					int capInfoListSize = CollectionUtils.isNotEmpty(capPayInfoList) ? capPayInfoList.size() : 0;
					if (capInfoListSize < payIdList.size()) {
						//查询is_del=1的放款信息
						CapPayInfoQueryCondition capCondition = new CapPayInfoQueryCondition();
						capCondition.setIdList(payIdList);
						capCondition.setIsDel(1);
						List<CapPayInfoDTO> capPayInfos = this.capPayInfoApiService.searchCapPayInfoList(capCondition);
						if (CollectionUtils.isNotEmpty(capPayInfos)) {
							if (CollectionUtils.isNotEmpty(capPayInfoList)) {
								capPayInfoList.addAll(capPayInfos);
							} else {
								capPayInfoList = capPayInfos;
							}
						}
					}
					if (CollectionUtils.isNotEmpty(capPayInfoList)) {
						for (CapPayInfoDTO capPayInfoDTO : capPayInfoList) {
							if (null != capPayInfoDTO) {
								capPayIdPrjIdMap.put(capPayInfoDTO.getId(), capPayInfoDTO.getPrjId());
								projectIdList.add(capPayInfoDTO.getPrjId());
								CapPayInfoVO capPayInfoVO = CapPayInfoVOTransform.toVO(capPayInfoDTO);
								//放款状态
								if (payStsCdMap != null && capPayInfoVO.getPayStsCd() != null) {
									capPayInfoVO.setPayStsCdNm(payStsCdMap.get(capPayInfoVO.getPayStsCd()));
								}
								//实付金额和实付时间
								if (payeeMap != null && payeeMap.containsKey(capPayInfoVO.getId())) {
									CapPayeeInfoDTO payeeInfoDTO = payeeMap.get(capPayInfoVO.getId());
									//实付时间
									capPayInfoVO.setActPayTm(payeeInfoDTO.getActPayTm());
									//实付金额
									capPayInfoVO.setActPayAmt(payeeInfoDTO.getActPayAmt());
								}
								payIdAndInfoMap.put(capPayInfoVO.getId(), capPayInfoVO);
							}
						}
					}
				}
				//组装项目信息
				Map<Long, PrjBscInfoVO> prjIdAndInfoMap = new HashMap<>();
				if (CollectionUtils.isNotEmpty(projectIdList)) {
					PrjBscInfoQueryCondition prjQC = new PrjBscInfoQueryCondition();
					prjQC.setIdList(projectIdList);
					List<PrjBscInfoDTO> prjBscInfoList = this.projectApiService.searchList(prjQC, CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd());
					if (CollectionUtils.isNotEmpty(prjBscInfoList)) {
						//事业部组织架构
						List<SysOrgDTO> orgList = this.sysOrgApiService.searchSysOrgListBy(CurrentThreadContext.getCurrentSysCd());
						Map<String, SysOrgDTO> buOrgCdMap = orgList.stream().collect(toMap(SysOrgDTO::getOrgCd, e -> e, (v1, v2) -> v2));
						SysOrgDTO sysOrgDTO = null;
						String orgCd = null;
						for (PrjBscInfoDTO prjBscInfoDTO : prjBscInfoList) {
							if (null != prjBscInfoDTO) {
								PrjBscInfoVO prjBscInfoVO = PrjBscInfoVOTransform.toVO(prjBscInfoDTO);
								if (buOrgCdMap.containsKey(prjBscInfoVO.getCstMgrOrgCd())) {
									sysOrgDTO = buOrgCdMap.get(prjBscInfoVO.getCstMgrOrgCd());
									prjBscInfoVO.setCstMgrOrgCdNm(sysOrgDTO.getOrgNm());
									orgCd = sysOrgDTO.getOrgCd();
									while (orgCd.length() > 8) {
										if ("4".equals(sysOrgDTO.getOrgTypCd())) {
											prjBscInfoVO.setCyOrgCdNm(sysOrgDTO.getOrgNm());
										} else if ("3".equals(sysOrgDTO.getOrgTypCd())) {
											prjBscInfoVO.setPrOrgCdNm(sysOrgDTO.getOrgNm());
											break;
										}
										orgCd = orgCd.substring(0, orgCd.length() - 4);
										if (buOrgCdMap.containsKey(orgCd)) {
											sysOrgDTO = buOrgCdMap.get(orgCd);
										} else {
											break;
										}
									}
								}
								prjIdAndInfoMap.put(prjBscInfoVO.getId(), prjBscInfoVO);
							}
						}
					}
				}
				//项目状态
				Map<String, String> prjStsCdMap = this.sysDictionaryApiService.searchGroupToMap(CurrentThreadContext.getCurrentSysCd(), CurrentThreadContext.getCurrentOrgCd(), DictionaryConstant.CODE_AUD_STS_CD);
				for (AudStandingBookVO audStandingBookVO : voList) {
					if (null != audStandingBookVO) {
						//放款信息
						if (payIdAndInfoMap != null && audStandingBookVO.getPayId() != null && payIdAndInfoMap.containsKey(audStandingBookVO.getPayId())) {
							audStandingBookVO.setCapPayInfoVO(payIdAndInfoMap.get(audStandingBookVO.getPayId()));
						} else {
							audStandingBookVO.setCapPayInfoVO(new CapPayInfoVO());
						}
						PrjBscInfoVO bscInfoVO = null;
						//项目信息
						if (prjIdAndInfoMap != null && audStandingBookVO.getProjectId() != null && prjIdAndInfoMap.containsKey(audStandingBookVO.getProjectId())) {
							bscInfoVO = prjIdAndInfoMap.get(audStandingBookVO.getProjectId());
							//项目状态
							if (prjStsCdMap != null && prjStsCdMap.containsKey(bscInfoVO.getPrjStsCd())) {
								bscInfoVO.setPrjStsCdNm(prjStsCdMap.get(bscInfoVO.getPrjStsCd()));
							}
							audStandingBookVO.setPrjBscInfoVO(bscInfoVO);
						} else if (prjIdAndInfoMap != null && audStandingBookVO.getProjectId() == null) {
							//台账中没有记录项目ID的，根据capId查询对应的项目信息
							Long prjId = capPayIdPrjIdMap.get(audStandingBookVO.getPayId());
							if (prjId != null && prjIdAndInfoMap.containsKey(prjId)) {
								bscInfoVO = prjIdAndInfoMap.get(prjId);
								//项目状态
								if (prjStsCdMap != null && prjStsCdMap.containsKey(bscInfoVO.getPrjStsCd())) {
									bscInfoVO.setPrjStsCdNm(prjStsCdMap.get(bscInfoVO.getPrjStsCd()));
								}
								audStandingBookVO.setPrjBscInfoVO(bscInfoVO);
							}
						} else if (audStandingBookVO.getProjectId() != null){
							PrjBscInfoVO vo = new PrjBscInfoVO();
							bscInfoVO = prjBscInfoService.selectById(audStandingBookVO.getProjectId());
							vo.setLsCntNo(bscInfoVO.getLsCntNo());
							audStandingBookVO.setPrjBscInfoVO(vo);
						}
					}
				}
			}
			endTm = System.currentTimeMillis();
			BaseLogUtils.newServiceLogger("searchRecordBookListPage END voList:" + voList.size() + ",耗时:" + (endTm - startTm)).info();
			page.setResultList(voList);
			page.setTotalCount(data.getTotalCount());
		} catch (Exception e) {
			BaseLogUtils.newServiceLogger("searchRecordBookListPage errorMsg:" + e.getMessage()).error(LogExceptionEnum.API_CODE_0102);
			e.printStackTrace();
		}
		return page;
	}

	@Override
	public String getPreviewCorePrcInfoForXNY(Long prjPrdId) throws BaseException {
		//模板为：{#产品名称}，{#产品品牌}，{#车系}，电池品牌{#电池品牌}，度数{#电池度数}，经核实该方案报价为{#参考价}元，符合市场价格标准。
		if (StringUtils.isEmpty(prjPrdId)) {
			return "";
		}
		BaseLogUtils.newServiceLogger("getPreviewCorePrcInfoForXNY 查询产品及明细信息Start prjPrdId:" + prjPrdId).info();
		PrjPrdBscInfoVO prjPrdBscInfoVO = this.prjPrdBscInfoService.selectPrjPrdBscAndDetailInfoById(prjPrdId.toString());
		BaseLogUtils.newServiceLogger("getPreviewCorePrcInfoForXNY 查询产品及明细信息End prjPrdBscInfoVO:" + JSON.toJSONString(prjPrdBscInfoVO)).info();
		if (null == prjPrdBscInfoVO) {
			return "";
		}
		PrjPrdExtVO prjprdExtVo = prjPrdBscInfoVO.getPrjPrdExtVO();
		if (null == prjprdExtVo) {
			prjprdExtVo = new PrjPrdExtVO();
		}
		//产品名称
		String prdNm = prjPrdBscInfoVO.getPrdNm();
		//产品品牌
		String brCdNm = prjPrdBscInfoVO.getBrCd();
		//车系
		String modelNm = prjPrdBscInfoVO.getModelNm();
		//电池品牌
		String batBrand = prjprdExtVo.getBatBrand();
		//电池度数（Kwh）
		String batDeg = prjprdExtVo.getBatDeg();
		//参考价
		Double guidePc = prjPrdBscInfoVO.getGuidePc();
		//生成核价信息
		StringBuffer previewCorePrcInfo = new StringBuffer();
		if (StringUtils.isNotEmpty(prdNm)) {
			previewCorePrcInfo.append(prdNm).append("，");
		}
		if (StringUtils.isNotEmpty(brCdNm)) {
			previewCorePrcInfo.append(brCdNm).append("，");
		}
		if (StringUtils.isNotEmpty(modelNm)) {
			previewCorePrcInfo.append(modelNm).append("，");
		}
		if (StringUtils.isNotEmpty(batBrand)) {
			previewCorePrcInfo.append("电池品牌").append(batBrand).append("，");
		}
		if (StringUtils.isNotEmpty(batDeg)) {
			previewCorePrcInfo.append("度数").append(batDeg).append("，");
		}
		if (null != guidePc) {
			previewCorePrcInfo.append("经核实该方案报价为").append(guidePc).append("元，符合市场价格标准。");
		}
		return previewCorePrcInfo.toString();
	}
}
